package com.cjm.struts2.action;

import org.apache.struts2.ServletActionContext;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * Created by jiaming.chen1 on 2015/6/25.
 */
public class ServletAction {
    public String execute(){
        HttpServletRequest request = ServletActionContext.getRequest();
        HttpSession session =  ServletActionContext.getRequest().getSession();

        session.setAttribute("SessionKey","SessionValue");
        return "success";
    }
}
